package com.cictec.middleware.gps.caculate.entity;

import java.util.Date;

import com.cictec.middleware.commons.utils.DateUtils;

/**
 * 里程统计对象
 * @author ql
 *
 */
public class BusMileage implements java.io.Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1128506469340012582L;

	// 司机ID
	private String doduuid;
	private String driverName;	// 新加的
	
	
	// 里程类型 0 非运营 1运营
	private String type;
	// 开始时间
	private Date startDate;
	private String startDateStr;
	// 结束时间
	private Date endDate;
	private String endDateStr;
	// 里程数字
	private double mileage = 0;

	
	/**
	 * 里程类型 0 非运营 1运营
	 * @return
	 */
	public String getType() {
		return type;
	}

	/**
	 * 里程类型 0 非运营 1运营 ..【其他】
	 * @param type
	 */
	public void setType(String type) {
		this.type = type;
	}
	
	/**
	 * 该状态段(0 非运营 1运营)司机id
	 * @param doduuid
	 */
	public String getDoduuid() {
		return doduuid;
	}

	/**
	 * 该状态段(0 非运营 1运营)设置司机id
	 * @param doduuid
	 */
	public void setDoduuid(String doduuid) {
		this.doduuid = doduuid;
	}
	
	/**
	 * 该状态段(0 非运营 1运营)的里程数据
	 * @return
	 */
	public double getMileage() {
		return mileage;
	}

	/**
	 * 更新该状态段(0 非运营 1运营)的里程数据
	 * @return
	 */
	public void setMileage(double mileage) {
		this.mileage = mileage;
	}
	
	/**
	 * 更新该状态段里程（原里程数据 + 该段里程数据）
	 * @param currentMielage 当前两个点的距离
	 */
	public void updateCurrentTypMielage(double currentMielage){
		this.mileage += currentMielage;
	}
	
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
		this.startDateStr = DateUtils.formatDateTimes(startDate);
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
		this.endDateStr = DateUtils.formatDateTimes(endDate);
	}
	

	public String getStartDateStr() {
		return startDateStr;
	}

	public void setStartDateStr(String startDateStr) {
		this.startDateStr = startDateStr;
	}

	public String getEndDateStr() {
		return endDateStr;
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
	}

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}





}
